import { BroadCastCall } from "../../broadCast/BroadCastCall";
import { MessageBlock } from "../../../../../Framework/MQ/MessageBlock";
import { SVIPUpgrade } from "../../../../../Message/Game/SVIPUpgrade";
import { NetDispatcher } from "../../../../mvc/core/NetDispatcher";
import { ServerCommand } from "../../../mvc/ServerCommand";
import { Cache } from "../../../cache/Cache";
//class VIPUpgradeCommand
    
    export  class VIPUpgradeCommand extends BroadCastCall
    {
        constructor(arg1: Object)
        {
            super(arg1);
            return;
        }

        public /* override */ call(arg1: MessageBlock): void
        {
            var loc1=arg1.messageBase as SVIPUpgrade;
            if (loc1.VIPTypeNew.__value > loc1.VIPTypeOld.__value) 
            {
                NetDispatcher.dispatchCmd(ServerCommand.VIPLevelUpgrade, Cache.instance.vip.vipInfo);
            }
            return;
        }
    }
